public class Demo01 {

    public static void main(String[] args) {

        Typer t1 = new Typer();  //新建状态
        Typer t2 = new Typer();
        Typer t3 = new Typer();

        t1.start();  //start():启动线程  就绪状态  线程进入线程队列排队，等待cpu的调度
        t2.start();
        t3.start();


        String str="Hello World!!!";
        for (int i = 0; i <str.length() ; i++) {
            System.out.println("main()打印:"+str.charAt(i));
            try {
                Thread.sleep(1000); //休眠，将运行机会让给cpu去调度其他线程
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
